# 角骨猜想
a = eval(input("请输入一个自然数："))
while a != 1:
    if a % 2 == 0:
        a = a // 2
        print(a)
    else:
        a = 3 * a + 1
        print(a)
